//
//  OCJsonViewController.m
//  OCUI
//
//  Created by login on 15-8-18.
//
//

#import "OCJsonViewController.h"
#import "NSString+JSONCategories.h"
#import "NSBaseBean.h"
@implementation OCJsonViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSString* data=@"[{\"key\":\"测试\"},{\"value\":\"3\"}]";
    id iddata=[data JSONValue];
    NSArray *arr=(NSArray*)iddata;
    for(int i=0;i<arr.count;i++)
    {
          NSLog(@"%@",arr[i]);
    }
    NSBaseBean * bean=[data JSONModelMap:@"key" WithKeyValue:@"value"];
    NSLog(@"%@,%@",bean.code,bean.value);
    // Do any additional setup after loading the view.
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
